package com.asiainfo.kbisheet.components.condition.text
{
	import com.asiainfo.kbisheet.components.condition.ConditionInput;
	import com.asiainfo.kbisheet.components.condition.ConditionItem;
	
	import spark.components.TextInput;

	/**
	 * 文本(text)输入条件的单组件呈现。
	 */
	public class ConditionInputText extends ConditionInput
	{
		private var tiText:TextInput;
		public function ConditionInputText(parent:ConditionItem)
		{
			super(parent);
		}
		
		override protected function createChildren():void {
			tiText = new TextInput();
			addElement(tiText);

		}
		
		override public function get value():String{
			if(tiText.text != null && tiText.text.length>0){
				return tiText.text;
			}else{
				return null;
			}
		}
	}
}